package logic;


public class Graph {

	public Vertex[] vertices;
	public int[][] distMatrix;
	
	public Graph(Vertex[] vertices){
		this.vertices = vertices;
		this.distMatrix = null;
	}
	
	public Graph(Vertex[] vertices, int[][] adjMatrix){
		this.vertices = vertices;
		this.distMatrix = adjMatrix;
	}
	
	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append(vertices.length);
		for(Vertex v : vertices){
			sb.append('\n');
			sb.append(v.x);
			sb.append(' ');
			sb.append(v.y);
		}
		return sb.toString();
	}
	
	public Graph clone(){
		Graph g = new Graph(this.vertices.clone());
		g.distMatrix = this.distMatrix.clone();
		return g;
	}
	
}
